<?
if ( !defined ( 'L_ADMOD' ) ){echo "<meta http-equiv='refresh' content='0; url=/index.php'>";exit;}
include("./inc/bloced.php");

include("admin/$op/menu.php");

$query=mysql_query("SELECT * FROM ".$wcpref.$op."_razd WHERE mod_prod_id='".$lid."' ORDER BY mod_nomer ASC");
print '<br><table border="0" cellpadding="3" cellspacing="1" align="center" width="65%">';
while($result=mysql_fetch_array($query))
{
	extract($result);
	$query_p=mysql_query("SELECT * FROM ".$wcpref.$op." WHERE mod_razd_id= '".$mod_id."' ORDER BY mod_nom ASC");
	print '<tr class="head">
		<td width="30">'.$mod_nomer.'</td>
		<td colspan="2">'.$mod_razdel.'</td>
		<td width="50" align="center">
			<a href="?op='.$op.'&flag=newrazd&item=editfrm&lid='.$mod_id.'" title="'._EDIT_.'"><img src="./images/buttons/edit.gif" border="0"></a>';
			Print"&nbsp;";
			print "<a href='?op=".$op."&flag=goto&action=delrazd&lid=".$mod_id."' onClick=\"return confirm('"._DELETE_." &quot;".$mod_razdel."&quot;?');\"><img src=\"images/buttons/del.gif\" border=\"0\"></a>";
		print'</td>
	</tr>';
	$d=0;
	while($result_p=mysql_fetch_array($query_p))
	{
		$d++;$iclass = ($d % 2) ? "even" : "odd";
		extract($result_p);
		print'<tr class="'.$iclass.'">
			<td colspan="2" align="right">'.$mod_nomer.'.'.$mod_nom.'</td>
			<td>'.$mod_name.'</td>
			<td align="center">
				<a href="?op='.$op.'&flag=newpage&item=editfrm&lid='.$mod_id_p.'" title="'._EDIT_.'"><img src="./images/buttons/edit.gif" border="0"></a>';
				Print"&nbsp;";
				print "<a href='?op=".$op."&flag=goto&action=delpage&lid=".$mod_id_p."' onClick=\"return confirm('"._DELETE_." &quot;".$mod_name."&quot;?');\"><img src=\"images/buttons/del.gif\" border=\"0\"></a>";
			print'</td>
		</tr>';
	}
}
print'</table>';
?>